<?php
$login_lbl = BUtils::T('login_lbl');
$password_lbl = BUtils::T('password_lbl');
$login_facebook_lbl = BUtils::T('login_facebook_lbl');

$this->pageTitle = $login_lbl;
?>
<div class="section-wrapper post-w">
<div class="container">
<h1 class="section-main-header"><?php echo $login_lbl; ?></h1>
<div class="row">
	<div class="span5 offset1">
		<div class="white-card extra-padding">
			<legend><?php echo Yii::t('app', 'Login to Yamii.fi'); ?></legend>
			<div class="text-center">
				<a href="javascript:;" class="facebookButton btn-facebook"><?php echo $login_facebook_lbl; ?></a>
			</div>
			<div style="position:relative; padding-top:12px;">
				<hr />
				<p style="background:#fbfdfe;padding:2px 8px;color:#222;position:absolute;left:48%;top:20px;">Or</p>
			</div>
			<div class="login-form row-fluid">
<?php
/** @var BootActiveForm $form */
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'id'=>'login-form',
	'htmlOptions'=>array('class'=>''),
	'enableClientValidation'=>false,
	'clientOptions'=>array(
		'validateOnSubmit'=>false,
	),
));
echo $form->textFieldRow($model, 'user_input', array('class'=>'span12', 'placeholder'=>Yii::t('app','Enter your phone number or email used at store') ));
echo $form->passwordFieldRow($model, 'password', array('class'=>'span12' ));
echo "<br />\n";
echo CHtml::submitButton($login_lbl, array('class'=>'btn btn-primary btn-large'));
$this->endWidget();
$form->errorSummary($model);
?>
				<hr />
				<div class="text-right">
					<a href="<?php echo Yii::app()->createUrl('/accounts/signup') ?>"><?php echo Yii::t('app', 'Create a new account'); ?>?</a>
				</div>
			</div>
		</div>
	</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function() {
	$('.btn-facebook').click(function(){
		fbUI.login('<?php echo Yii::app()->createUrl('/accounts/facebook'); ?>');
	});
});
</script>